VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "ESC.17/01/10/12 -Cupom Fiscal"
   ClientHeight    =   2130
   ClientLeft      =   3645
   ClientTop       =   1875
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   2130
   ScaleWidth      =   4680
   Begin VB.CommandButton Command1 
      Caption         =   "Cupom Fiscal"
      Height          =   495
      Left            =   1680
      TabIndex        =   0
      Top             =   480
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      Height          =   855
      Left            =   120
      TabIndex        =   1
      Top             =   1200
      Width           =   4335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function Abre Lib "SWECF.DLL" Alias "ECFOpen" (ByVal Numero As Long, ByVal Tempo As Long, ByVal Log As Long, ByVal Mostra As Long) As Long
Private Declare Function Fecha Lib "SWECF.DLL" Alias "ECFClose" () As Long
Private Declare Function Grava Lib "SWECF.DLL" Alias "ECFWrite" (ByVal Comando As String) As Long
Private Declare Function Retorna Lib "SWECF.DLL" Alias "ECFRead" (ByVal Status As String, ByVal Extensao As Long) As Long

Private Sub Command1_Click()

     Dim Status As String
          
     Status = Space(512)
     Comando = Chr(27) & ".17}"
     dll1 = Abre(1, 2, 1, 1)
     dll2 = Grava(Comando)
     dll3 = Retorna(Status, 512)
     Label2.Caption = "Status = " & Status
     If dll1 = 0 Then dll4 = Fecha()
Status = Space(512)
     Comando = Chr(27) & ".0178910251234540001000000000100000000000100Teste Visual Basic      T01}"
     dll1 = Abre(1, 2, 1, 1)
     dll2 = Grava(Comando)
     dll3 = Retorna(Status, 512)
     Label2.Caption = "Status = " & Status
     If dll1 = 0 Then dll4 = Fecha()
Status = Space(512)
     Comando = Chr(27) & ".1001000000000500}"
     dll1 = Abre(1, 2, 1, 1)
     dll2 = Grava(Comando)
     dll3 = Retorna(Status, 512)
     Label2.Caption = "Status = " & Status
     If dll1 = 0 Then dll4 = Fecha()
Status = Space(512)
     Comando = Chr(27) & ".12NN0         OBRIGADO PELA PREFERENCIA      }"
     dll1 = Abre(1, 2, 1, 1)
     dll2 = Grava(Comando)
     dll3 = Retorna(Status, 512)
     Label2.Caption = "Status = " & Status
     If dll1 = 0 Then dll4 = Fecha()
End Sub

